#{extends 'main.html' /}
#{set title:'Profil' /}

<div class="profile-main">

<div class="details-title">
${profileUser.name} - Profil Bilgileri
</div>


<div class="profile-left">

<div class="profile-left-name">
${profileUser.name}
</div>

<div class="profile-left-pic">
<img alt="${profileUser.name}" width="120px" src="${profileUser.profilPictureBig}">
</div>

#{if user != profileUser}
<div class="profile-left-link">
<a href="/message/${profileUser.id}" style="color: #59983B;">Mesaj Gönder</a>
</div>
#{/if}

#{if user == profileUser}
<div class="profile-left-link">
<a href="/inbox" style="color: #59983B;">Mesajlar</a>
</div>

<div class="profile-left-link">
<a href="/comingrequests" style="color: #59983B;">İstekler</a>
</div>
#{/if}

</div>


<div class="profile-right">

<div class="details-title">
Seyahatler
</div>



#{paginate.list items:paginator, as:'journey'}
<div class="profile-tab">

<div class="profile-tab-route">
#{if journey?.getClass().getName() == "models.DriverJourney"}
<a href="/driverjourneydetails/${journey.id}" style="color: #3B5998;">${journey?.departurestate} - ${journey?.departuretownn} ---> ${journey?.arrivestate} - ${journey?.arrivetownn}</a>
#{/if}
#{else}
<a href="/hitcjourneydetails/${journey.id}" style="color: #3B5998;">${journey?.departurestate} - ${journey?.departuretownn} ---> ${journey?.arrivestate} - ${journey?.arrivetownn}</a>
#{/else}
</div>


<div class="profile-middle">

<div class="profile-col">

<div class="row">
<div class="profile-col-left">
Kalkış :
</div>
<div class="profile-col-right">
${journey?.departurestate}/${journey?.departuretownn}/${journey?.departurestreet}
</div>
</div>

<div class="row">
<div class="profile-col-left">
Varış :
</div>
<div class="profile-col-right">
${journey?.arrivestate}/${journey?.arrivetownn}/${journey?.arrivestreet}
</div>
</div>

</div>


<div class="profile-col2">


<div class="row">
<div class="profile-col-left">
Tarih :
</div>
<div class="profile-col-right">
${journey?.departuredate.format('dd/MM/yyyy')}
</div>
</div>

<div class="row">
<div class="profile-col-left">
Saat :
</div>
<div class="profile-col-right">
${journey?.departurehour}
</div>
</div>

</div>

<div class="profile-plate">
#{if journey?.getClass().getName() == "models.DriverJourney"}
${journey?.vehicle?.plate}
#{/if}
</div>

</div>

</div>
#{/paginate.list} 
#{paginate.controls items:paginator /} 

</div>

</div>

